
//
//  DetailmeetingViewController.m
//  PDA巡检
//
//  Created by Vencoo on 14-2-28.
//  Copyright (c) 2014年 Vencoo. All rights reserved.
//

#import "DetailmeetingViewController.h"
#import "DetailMode.h"
#import "MeetingView.h"
@interface DetailmeetingViewController ()

@end

@implementation DetailmeetingViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
    self.title = @"会议详情查看";
    UIScrollView *myBcakScrollView = [[UIScrollView alloc]initWithFrame:CGRectMake(10, 20, 1000, 650)];
    myBcakScrollView.contentSize = CGSizeMake(1000, 1880);
    [self.view addSubview:myBcakScrollView];
    myBcakScrollView.scrollEnabled  = YES;
    UIView *contentView = [[NSBundle mainBundle]loadNibNamed:@"myDetailmeetingView" owner:self options:nil][0];
    [myBcakScrollView addSubview:contentView];
    NSDictionary *dataDic = self.delegate.receiveArr[0];
    NSLog(@"%@",dataDic);
    for (int i = 0; i < contentView.subviews.count; i ++)
    {
        UIView *myView = contentView.subviews[i];
        if ([myView tag] >= 200)
        {
            DetailMode *detail = [[DetailMode alloc]initWithDic:dataDic andTag:myView.tag];
            if ([[NSString stringWithFormat:@"%@",detail.resultStr] isEqualToString:@"0"])
            {
                [(UIButton *)myView setImage:[UIImage imageNamed:@"选择框-1"] forState:UIControlStateNormal];
            }
            else if ([[NSString stringWithFormat:@"%@",detail.resultStr] isEqualToString:@"1"])
            {
                [(UIButton *)myView setImage:[UIImage imageNamed:@"选择框-2"] forState:UIControlStateNormal];
            }
        }
        else if ([myView tag] >= 100)
        {
            DetailMode *detail = [[DetailMode alloc]initWithDic:dataDic andTag:myView.tag];
            UITextField *textF = (UITextField *)myView;
            textF.text =  [NSString stringWithFormat:@"%@",detail.resultStr];
            if ([textF.text isEqualToString:@"<null>"] || [textF.text isEqualToString:@"(null)"])
            {
                textF.text = @"";
            }
        }
    }
}


- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
